package com.day19.properties;

import java.util.Set;
import java.util.Properties; // 正确导入Properties类

public class PropertiesDemo01 {
    public static void main(String[] args) {
        Properties prop = new Properties(); // 使用正确的类名Properties
        prop.setProperty("itheima001", "林青霞"); // 使用setProperty方法
        prop.setProperty("itheima002", "张曼玉");
        prop.setProperty("itheima003", "王祖贤");

        Set<Object> keySet = prop.keySet();
        for (Object key : keySet) {
            String value = prop.getProperty(key.toString()); // 获取属性值
            System.out.println(key + "," + value); // 输出键值对
        }
    }
}

